<template>
  <h3>getters</h3>
  <!-- <p>age: {{ age }}</p> -->
  <ul>
    <li v-for="item in oddArr">{{ item }}</li>
  </ul>
</template>

<script>
import { mapGetters, mapState } from "vuex";

export default {
  // computed: {
  //   arr() {
  //     return this.$store.state.arr.filter((item) => item % 2);
  //   },
  // },

  computed: {
    oddArr() {
      return this.$store.getters.oddArr;
    },
  },

  // computed: mapGetters(["oddArr"]),
  // computed: mapGetters({
  //   arr: "oddArr",
  // }),

  // computed: {
  //   ...mapState(["age"]),
  //   ...mapGetters(["oddArr"]),
  // },
};
</script>
